
<title>成长档案</title>

<div class="layui-fluid upManager">
    <div class="layui-row">

        <div class="layui-col-md12">

            <div class="layui-card">
                <div class="layui-card-body">

                    <div id="postFormView"></div>

                </div>
            </div>
        </div>

    </div>
</div>


<script type="text/html" id="postFormTpl">
    <form action="" class="layui-form" lay-filter="component-form-group">
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder=""
                       class="layui-input" value="{{d.title}}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">联系地址</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder=""
                       class="layui-input" value="{{d.address}}">
            </div>
        </div>




        <div class="layui-form-item">
            <div class="layui-input-block">
                <div class="layui-footer">
                    <button class="layui-btn" lay-submit="" lay-filter="component-form-demo1">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </div>

    </form>
</script>
<script>


    layui.use(['admin', 'laytpl', 'form'], function () {
        var admin = layui.admin,
            laytpl = layui.laytpl,
            form = layui.form;
        var $ = layui.$;


        var getTpl = postFormTpl.innerHTML,
            view = document.getElementById('postFormView');

        laytpl(getTpl).render({
            "title": "打扫卫生",
            "address": "北京市朝阳区安定门外大街1号11层（安贞孵化器A048号）"
        }, function (html) {
            view.innerHTML = html;
        });

        form.render();


    });
</script>